package net.lgpage.util;

import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

public abstract class ViewGroupAdapter extends BaseAdapter{

	ViewGroup vp;
	
	public ViewGroupAdapter(ViewGroup vp) {
		super();
		this.vp = vp;
	}

	
	@Override
	public void notifyDataSetChanged() {
		if(vp == null)return;
		vp.removeAllViews();
		for(int i = 0;i<getCount();i++){
			View v = getView(i, null, vp);
			vp.addView(v);
		}
		super.notifyDataSetChanged();
	}


	@Override
	public Object getItem(int position) {
		return null;
	}


	@Override
	public long getItemId(int position) {
		return 0;
	}

	

}
